﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Mq400.aspx.cs" Inherits="ZX.WebApp.Message.Mq400" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <link rel="stylesheet" type="text/css" href="../Scripts/yui_2.9.0/build/container/assets/skins/sam/container.css" />
    <link rel="stylesheet" type="text/css" href="../scripts/yui_2.9.0/build/button/assets/skins/sam/button.css" />
    <link rel="stylesheet" type="text/css" href="../scripts/yui_2.9.0/build/layout/assets/skins/sam/layout.css" />
    <link rel="stylesheet" type="text/css" href="../scripts/yui_2.9.0/build/resize/assets/skins/sam/resize.css" />
    <link rel="stylesheet" type="text/css" href="../scripts/yui_2.9.0/build/datatable/assets/skins/sam/datatable.css" />
    <link href="../Styles/base.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.json-2.2.js" type="text/javascript"></script>
    <script src="../Scripts/Jquery.form.js" type="text/javascript"></script>
    <script src="../Scripts/CombinButton.js" type="text/javascript"></script>
    <link href="../Styles/default/calendar.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery.calendar.js" type="text/javascript"></script>
    <script src="../Scripts/extend.validate.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/element/element-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/datasource/datasource-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/json/json-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/get/get-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/dragdrop/dragdrop-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/datatable/datatable-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/paginator/paginator-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/layout/layout-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/button/button-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/container/container-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/event-delegate/event-delegate-min.js"></script>
    <link href="../Styles/extendTable.css" rel="stylesheet" type="text/css" />
    <link href="cssjs/message.css" rel="stylesheet" type="text/css" />
     <style type="text/css">
         .tabck
         {
              width:100%;
         }
        .tableContent
        {
            font-size:12px;
        }
        .tableContent th
        {
            border: solid 1px #D4DBE2;
            font-weight: bold;
            background-color: #F2F8FF;
            white-space: nowrap;
            line-height: 28px;
            text-align: left; padding-left:3px;
        }
        .tableContent td
        {
            border: solid 1px #D4DBE2;
            background-color: #F2F8FF;
            line-height: 28px;
            text-align: left;
            padding-left:3px;
        }
        .textbox
        {
            border-bottom: black 1px solid;
            border-top-style: none;
            border-right-style: none;
            border-left-style: none;
            background-color: white;
            overflow:hidden;
            height: 100%;
            width:98%; 
        }
         .style6
        {
           border-bottom: black 1px solid;
           border-top-style: none;
           border-right-style: none;
           border-left-style: none;
           background-color: white;
           overflow:hidden;
           height: 100%;
           width: 98%;
        }
        .labmessage
        {
            color:Red; 
        }
    </style>
</head>
<body  class="yui-skin-sam">
    <form id="form1" runat="server">
    <div>
     <table style=" margin-top:5px;" class="tableContent">
            <tr>
                <td width="100">来电号码：</td>
                <td>
                <input type="text" id="txtphone" name="receave"  runat="server"  style="width:200px;" />
                </td>
                <td width="100">来电时间：</td>
                <td>
                <input runat="server" type="text" id="txtcometime" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"  style="width:200px; " />
                <span style="color: Red">*</span></td>
            </tr>
            <tr>
                <td width="100">客户名称：</td>
                <td>
                <input type="text" id="txtcus" name="receave"  runat="server"  style="width:200px;" /><span style="color: Red">*</span>
                </td>
                <td width="100">客户职位：</td>
                <td><input type="text" id="txtzhiwei" name="receave"  runat="server"  style="width:200px;" /></td>
            </tr>
            <tr>
                <td width="100">企业名称：</td>
                <td>
                <input type="text" id="txtcompany" name="receave"  runat="server"  style="width:200px;" />
                </td>
                <td width="100">客户来源：</td>
                <td>
                <input type="text" id="txtcomesource" name="receave"  runat="server"  style="width:200px;" />
                </td>
            </tr>
            <tr>
                <td width="100">客户需求：</td>
                <td colspan="3">
                <textarea id="txtcusrequere" name="receave" rows="6"    runat="server"
                        style="width:75%;"></textarea><span style="color: Red">*</span>
                </td>
            </tr>
            <tr>
                <td width="100">处理人：</td>
                <td><input type="hidden" id="procp" runat="server" />
                <input type="text" id="txtprocp" name="receave"  runat="server"  style="width:200px;" />
                <button id="btnprocp" name="mq4"  class="btnCheck"  type="button" 
                            style="width: 50px;height:25px;">
                            选择..</button>
                </td>
                <td width="100">处理人手机：</td>
                <td>
                 <input type="text" id="txttelphone" name="receave"  runat="server"  style="width:200px;" />
                </td>
            </tr>
            <tr>
            <td width="100">处理部门：</td>
                <td><input type="hidden" id="hdfdeptid" runat="server" />
                 <input type="text" id="txtprocdept" name="receave"  runat="server"  style="width:200px;" />
                </td>
                <td width="100">承诺处理：</td>
                <td>
                <input runat="server" type="text" id="txtproctime" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"   style="width:200px; " />
                <span style="color: Red">*</span> </td>
                
            </tr>
            <tr>
                <td width="100">阶段性成果：</td>
                <td colspan="3">
                <textarea id="txtstepresult" name="receave" rows="6"    runat="server"
                        style="width:75%;"></textarea>
                </td>
            </tr>
            <tr>
                <td width="100">最终结果：</td>
                <td>
                <asp:RadioButtonList ID="rbtoverstep"  RepeatDirection="Horizontal" BorderStyle="None"  Width="200" runat="server">
                    <asp:ListItem Selected="True" Value="未处理">未处理</asp:ListItem>
                    <asp:ListItem Value="处理中">处理中</asp:ListItem>
                    <asp:ListItem Value="已完成">已完成</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
                <td>记录分类</td>
                <td>
                <asp:DropDownList ID="selecttype" runat="server" AppendDataBoundItems="true" Width="200">
                        <asp:ListItem Value="1">新客户咨询</asp:ListItem>
                        <asp:ListItem Value="2">老客户咨询</asp:ListItem>
                        <asp:ListItem Value="3">成交客户</asp:ListItem>
                        <asp:ListItem Value="4">投诉电话</asp:ListItem>
                        <asp:ListItem Value="5">应聘咨询</asp:ListItem>
                        <asp:ListItem Value="6">订购书籍</asp:ListItem>
                        <asp:ListItem Value="7">招商咨询</asp:ListItem>
                        <asp:ListItem Value="8">签鹰客户</asp:ListItem>
                        <asp:ListItem Value="9">找行销顾问</asp:ListItem>
                        <asp:ListItem Value="10">内部电话</asp:ListItem>
                        <asp:ListItem Value="11">讲师分区</asp:ListItem>
                        <asp:ListItem Value="12">讲场未成交</asp:ListItem>
                    </asp:DropDownList><span style="color: Red">*</span>
                </td>
            </tr>
            <tr>
            <td>接电人：</td>
            <td><input type="text" id="txtjiedianren" name="receave"  runat="server"  style="width:200px;" />
                <span style="color: Red">*</span></td>
            <td>需求分类：</td>
            <td>
            <input type="text" id="txtreqtype" name="receave"  runat="server"  style="width:200px;" />
            </td>
            </tr>
            <tr>
            
            <td>
                <asp:Label ID="Label1" runat="server" ForeColor="Red" Text=""></asp:Label>
            
            </td><td ><asp:Button ID="btnsave" runat="server" Text="保存" class="btnCheck" OnClientClick="return checkmes();" OnClick="btnsaveOnClick"
                            style="width: 100px;height:25px;" /> &nbsp;&nbsp;注意：带 * 号的为必填项</td>
            <td colspan="2">
            <asp:Button ID="btndelete" Visible="false" runat="server" Text="删除" class="btnCheck" OnClientClick="return confirmdelete();" OnClick="btnDeleteOnClick"
                            style="width: 100px;height:25px;" />
            </td>
                            </tr>
         </table>
    </div>
    <div id="dialog1" class="yui-pe-content">
            <div class="hd">
                人员选择</div>
            <div class="bd">
                <iframe id="EditUIWindow1" frameborder="0" src="" style="width: 100%; height: 100%;
                    margin: 0px; padding: 0px;"></iframe>
            </div>
        </div>
    </form>
    <script language="javascript" type="text/javascript" src="../Scripts/DatePicker/WdatePicker.js"></script>
<script  language="javascript" type="text/javascript">
    var addUser = '<% =UserId %>';
    function checkmes() {
        var phone = document.getElementById("txtphone");
        var comtime = document.getElementById("txtcometime");
        var cus = document.getElementById("txtcus");
        var creq = document.getElementById("txtcusrequere");
        var jidianren = document.getElementById("txtjiedianren");
        var proctime = document.getElementById("txtproctime");
        if (comtime.value == null || comtime.value == "") {
            alert("请填写[来电时间]");
            comtime.focus();
            return false;
        }
        else if (cus.value == null || cus.value == "") {
            alert("请填写[客户名称]");
            cus.focus();
            return false;
        }
        else if (creq.value == null || creq.value == "") {
            alert("请填写[客户需求]");
            creq.focus();
            return false;
        }
        else if (jidianren.value == null || jidianren.value == "") {
            alert("请填写[接电人]");
            jidianren.focus();
            return false;
        }
        else if (proctime.value == null || proctime.value == "") {
            alert("请填写[承诺处理时间]");
            proctime.focus();
            return false;
        }
        else
            return true;
    }

    function confirmdelete() {
        return confirm("是否要删除？");
    }
    function backresult(obj) {
        if (obj == "1") {
            alert("删除成功");
            parent.ReLoadData();
            parent.closeWin();
        }
        else
            alert("删除失败");
    }

    //选择对应的方法和ID
    var _fn, _id;
    function ShowDialog1(fn, id, src) {
        _fn = fn;
        _id = id;
        document.getElementById("EditUIWindow1").src = src;
        YAHOO.example.container.dialog1.show();
    }
    YAHOO.namespace("example.container");
    YAHOO.util.Event.onDOMReady(function () {
        var handleSubmit = function () {
            var editwindow = document.getElementById("EditUIWindow1");
            if (editwindow) {
                editwindow.contentWindow.ChooseInfo();
                //alert("aa");
                var backvalue = document.getElementById("txtprocp").value;
                var bs = backvalue.split('>');
                if (bs.length > 0) {
                    document.getElementById("txtprocp").value = bs[0];
                    document.getElementById("txtprocdept").value = bs[2];
                    document.getElementById("hdfdeptid").value = bs[3];
                    document.getElementById("txttelphone").value = bs[1];
                }
            }
            YAHOO.example.container.dialog1.hide();
        };
        var handleCancel = function () {
            this.cancel();
        };
        var handleSuccess = function (o) {
            var response = o.responseText;
            response = response.split("<!")[0];
            document.getElementById("resp").innerHTML = response;
        };
        var handleFailure = function (o) {
            alert("Submission failed: " + o.status);
        };
        YAHOO.example.container.dialog1 = new YAHOO.widget.Dialog("dialog1",
					            { width: "580px",
					                height: "450px",
					                fixedcenter: true,
					                visible: false,
					                draggable: true,
					                close: true,
					                autofillheight: "body",
					                constraintoviewport: true,
					                buttons: [{ text: "确定", handler: handleSubmit, isDefault: true },
								            { text: "取消", handler: handleCancel}]
					            });
        YAHOO.example.container.dialog1.callback = { success: handleSuccess, failure: handleFailure };
        YAHOO.example.container.dialog1.render();
    });


    function chechezishunum(obj) { //labnums
        document.getElementById("labnums").innerHTML = "已输入：" + obj.value.length + " 个字";
    }

    //判断是否有成功，成功则关闭页面
    YAHOO.util.Event.onDOMReady(function () {
        //alert("");
        var lab = document.getElementById("Label1");
        if (lab.innerHTML == "保存成功") {
            alert("保存成功");
            window.parent.$("#tabs").tabs('close', '添加400电话记录');
            window.parent.$("#tabs").tabs('close', '修改400电话记录');
        }
    });
</script>

</body>
</html>
